From: Roger Pau Monné Date: Tue, 23 Jul 2019 15:00:07 +0000 (+0200) Subject: x86/iommu: add comment regarding setting of need_sync X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1862 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52fc4aaf1613e49d018bf3c5b1899b131ee2f417;p=xen.git x86/iommu: add comment regarding setting of need_sync Clarify why relaxed hardware domains don't need iommu page-table syncing. Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 79ec6719f5..f8c3bf53bd 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -185,6 +185,10 @@ void __hwdom_init iommu_hwdom_init(struct domain *d) register_keyhandler('o', &iommu_dump_p2m_table, "dump iommu p2m table", 0); hd->status = IOMMU_STATUS_initializing; + /* + * NB: relaxed hw domains don't need sync because all ram is already + * mapped in the iommu page tables. + */ hd->need_sync = iommu_hwdom_strict && !iommu_use_hap_pt(d); if ( need_iommu_pt_sync(d) ) {